﻿namespace GoodAdmin.Web.Core;

internal class AuthComponents : IServiceComponent
{
    public void Load(IServiceCollection services, ComponentContext componentContext)
    {
        //JWT配置
        //enableGlobalAuthorize: true 表示允许全局授权
        services.AddJwt<JwtHandler>(enableGlobalAuthorize: true);

        //跨域
        services.AddCorsAccessor();
    }
}